﻿using System.ComponentModel.DataAnnotations.Schema;
using JetBrains.Annotations;
using Volo.Abp.Domain.Entities;

namespace CommonManagement
{
    /// <summary>
    /// 反馈类
    /// </summary>
    public class Feedback : Entity<int>
    {
        /// <summary>用户Id</summary>
        public int UserId { get; protected set; }

        /// <summary>应用类别</summary>
        public string AppType { get; protected set; }

        /// <summary>反馈标题</summary>
        public string Title { get; protected set; }

        /// <summary>反馈内容</summary>
        public string Content { get; protected set; }

        /// <summary>用户</summary>
        [ForeignKey("UserId")]
        public User User { get; protected set; }

        private Feedback() { }

        internal Feedback(
            int userId,
            string appType,
            [NotNull] string title,
            [NotNull] string content)
        {
            UserId = userId;
            AppType = appType;
            Title = title;
            Content = content;
        }
    }
}